約 5,044,213 件
https://w.atwiki.jp/lud-p/pages/31.html
samba 3.6 jail minitree 10.2-Release samba 3.6 jail minitree 10.2-Release samba36 jail インストール ports から samba36 をインストールします maintenance ShellScript用Configファイル作成 samba36 仮稼動・設定 samba36 仮稼動 共有ディレクトリの設定 自動起動設定 Packet Filterの設定 user 追加・削除・passwd 変更スクリプトです 資料 アーカイブ 関連ページ samba 3.6 を jail minitree として導入した備忘的まとめです samba 3.6 chroot minitree 9.0-Releaseを参考に chroot から jail minitree へ さらに jail.conf を使用するように変更しています samba36 jail インストール 基本的にjail fulltree環境での作業になります 事前に /root/maintenance に maintenace ShellScript環境を用意しておきます ports から samba36 をインストールします config 設定PORT以外のオプションを外します # cd /usr/ports/net/samba36 # make config オプションメニュー LDAP With LDAP support ADS With Active Directory support CUPS With CUPS printing support WINBIND With WinBIND support SWAT With SWAT WebGUI ACL_SUPPORT With ACL support AIO_SUPPORT With Asyncronous IO support FAM_SUPOORT With File Alteration Monitor SYSLOG With Syslog support QUOTAS With Disk quota support UTMP With UTMP accounting support PAM_SMBPASS With PAM authentication vs passdb backends DNSUPDATE With dynamic DNS update(require ADS) AVAHI With Bonjour service discovery support EXP_MODULES With experimental modules PORT With system-wide PORT library IPV6 With IPv6 support MAX_DEBUG With maximum debugging SMBTORTURE With smbtorture samba36 のインストール途中 tdb 1.2.9,1 , python27 2.7.3_3 , libiconv 1.14 , talloc 2.0.7 , perl 5.14.2_2 , m4 1.4.16_1,1 help2man 1.40.11 のconfig 画面になるのでオプションはそのままでインストールします # pkg_replace -vcCN net/samba36 ↑ maintenance ShellScript用Configファイル作成 Configファイルを作成します # cd /root/maintenance/config # vi samba36.txt # samba /usr/local/sbin/nmbd /usr/local/sbin/smbd /usr/local/bin/pdbedit /usr/local/etc/smb.conf /usr/local/etc/smb.conf.sample #syslog-ng /usr/local/sbin/syslog-ng /usr/local/sbin/syslog-ng-ctl # miniroot /etc/group /etc/host.conf /etc/hosts /etc/localtime /etc/master.passwd /etc/passwd /etc/printcap /etc/pwd.db /etc/resolv.conf /etc/spwd.db /usr/sbin/nologin # library /libexec/ld-elf.so.1 /usr/local/lib/libiconv/libiconv.so.* /usr/local/lib/syslog-ng/* # directory #mkdir /dev #mkdir /tmp #mkdir /usr/local/etc/samba #mkdir /usr/local/private #mkdir /var/db/samba #mkdir /var/log/samba #mkdir /var/run/samba # share directory #mkdir /var/samba # log.nmdb log.smdb /dev/null #comm ln -s /dev/null ./var/log/samba/log.nmbd #comm ln -s /dev/null ./var/log/samba/log.smbd 必要なファイルを集めます # ../makembeddedtree.sh samba36.txt /tmp/samba36 passwd の編集samba に不要なものは削除します # vipw -d /tmp/samba36/etc root * 0 0 0 0 Charlie /root /usr/sbin/nologin toor * 0 0 0 0 Bourne-again Superuser /root daemon * 1 1 0 0 Owner of many system processes /root /usr/sbin/nologin nobody * 65534 65534 0 0 Unprivileged user /nonexistent /usr/sbin/nologin group の編集samba に不要なものは削除します # vi /tmp/samba36/etc/group wheel * 0 root daemon * 1 nobody * 65534 hosts.allow の設定 echo ALL ALL deny /tmp/samba36/etc/hosts.allow smb.conf の設定# vi /tmp/samba36/usr/local/etc/smb.conf [global] workgroup = WORKGROUP netbios name = SAMBA server string = Samba %v hosts allow = 192.168.1. interfaces = re0 socket address = 192.168.1.232 bind interfaces only = yes nmbd bind explicit broadcast = no security = user encrypt passwords = yes domain logons = yes domain master = yes local master = yes wins support = yes preferred master = yes os level = 65 dos charset = eucjp-ms unix charset = UTF-8 display charset = UTF-8 create mask = 0774 directory mask = 0774 passdb backend = tdbsam load printers = no [samba] path=/var/samba writeable = Yes samba 用 group user を用意しますgroup id user id は任意の数字でかまいません /usr/sbin/pw -V /tmp/samba36/etc groupadd samba -g 20000 /usr/sbin/pw -V /tmp/samba36/etc useradd tail -u 29999 -g 20000 -s /usr/sbin/nologin -d /nonexistent samba36 minimaltree 環境の移動samba36 minitree 環境を本来稼動したい位置へ移動しますzfs で切り分けます # exit # zfs create -o mountpoint=/jail/samba36 tank0/jail/samba36 # mv /jail/mainte/tmp/samba36/* /jail/samba36 ↑ samba36 仮稼動・設定 samba36 仮稼動 samba36 minitree の仮稼動仮稼動のあと、ログファイル(log.nmbdとlog.smbd)ができている確認します # mount -t devfs devfs /jail/samba36/dev # jail /jail/samba36 test.localdomain 192.168.1.200 /usr/local/sbin/nmbd # ls -la /jail/samba36/var/log/samba 共有ディレクトリの設定 sambaグループのみ許可します # cd /jail/samba36/var # chmod 774 samba # chown root 20000 samba ↑ 自動起動設定 nmbd smbd の順番で起動するように設定します samba36 の自動起動設定nullデバイスをマウントするのですが、jail fulltree 10.2-Relasesにてdevfs.rulesにそのルールを設定しているルールを使用しますjail.conf に追記します # vi /etc/jail.conf samba36{ mount.devfs; devfs_ruleset = $devfs_jail_inet; allow.raw_sockets = "1"; //allow.sysvipc = "1"; jid = "232"; $ip4addr = "192.168.1.232/24"; /* inet */ ip4.addr = ${ip4addr}; interface = ${int_if}; exec.prestart = ""; exec.start = ""; exec.poststart = ""; exec.prestop = ""; exec.stop = ""; exec.poststop = ""; vnet.interface = ""; /* inet */ /* vnet vnet; /* vnet */ exec.prestart += ""; exec.start += "/usr/local/sbin/syslog-ng"; exec.poststart += "jexec $name /usr/local/sbin/nmbd -D -s /usr/local/etc/smb.conf"; exec.poststart += "jexec $name /usr/local/sbin/smbd -D -s /usr/local/etc/smb.conf"; exec.prestop += ""; exec.stop += ""; exec.poststop += "pkill -F ${path}/var/run/samba/smbd.pid"; exec.poststop += "pkill -F ${path}/var/run/samba/nmbd.pid"; /* persist */ persist; /* depend */ //depend; } rc.conf の jail_list に samba36 を追記します # vi /etc/rc.conf jail_list="..... samba36" ↑ Packet Filterの設定 pf.conf の設定このままでは、nmbd がブロードキャストに応答しませんので、pf を使用して、ブロードキャストをリダイレクトします # vi /etc/pf.conf # interface ext_if="re0" # network address table int_network const {192.168.1.0/24} int_samba ="192.168.1.232" # port port_nmb ="{137,138}" scrub in all # nat(int) rdr pass on $ext_if proto udp from any to ($ext_if broadcast) port port_nmb - $int_samba rc.conf での設定rc.conf に追記します # vi /etc/rc.conf # pf pf_enable="YES" pf_flags="" pflog_enable="YES" gateway_enable="YES" ↑ user 追加・削除・passwd 変更スクリプトです 以前のものと同じです # vi smbuser.sh #!/bin/sh smbDir=/jail/samba36 smbGroup=20000 case "$1" in add) /usr/sbin/pw -V $smbDir/etc useradd -n $2 -u $3 -g $smbGroup -s /usr/sbin/nologin -d /nonexistent chroot $smbDir /usr/local/bin/pdbedit -a -u $2 ;; del) chroot $smbDir /usr/local/bin/pdbedit -x -u $2 /usr/sbin/pw -V $smbDir/etc userdel -n $2 ;; chpw) chroot $smbDir /usr/local/bin/pdbedit -x -u $2 chroot $smbDir /usr/local/bin/pdbedit -a -u $2 *) echo " usage $0 add username uid" echo " $0 del username" echo " $0 chpw username" esac ↑ 資料 アーカイブ ↑ 関連ページ ↑ 名前 コメント
https://w.atwiki.jp/dt_2ch/pages/17.html
1993/08/23 東京:新宿厚生年金会館 1. Metropolis Part I/ 2. Mission Impossible/ 3. Afterlife 4. Under a Glass Moon 5. Wait for Sleep/ 6. Surrounded 7. Ytsejam (w/ drum solo including samples) 8. Puppies on Acid/ 9. Take the Time 10. To Live Forever (w/ Within You Without You (Beatles)) 11. extended jam (includes guitar solo) 12. A Fortune in Lies 13. Another Day 14. Pull Me Under ~~~encore~~~ 15. Eve 16. Learning to Live Twin Peaks (outro tape) 1993/08/25 東京:中野サンプラザ 1. Metropolis Part I/ 2. Mission Impossible/ 3. Afterlife 4. Under a Glass Moon 5. Wait for Sleep/ 6. Surrounded 7. Ytsejam (w/ drum solo including samples) 8. Puppies on Acid/ 9. Take the Time 10. To Live Forever (w/ Within You Without You (Beatles)) 11. extended jam (includes guitar solo) 12. A Fortune in Lies 13. Another Day 14. Pull Me Under ~~~encore~~~ 15. Eve 16. Learning to Live Twin Peaks (outro tape) 1993/08/26 東京:中野サンプラザ 1. Metropolis Part I/ 2. Mission Impossible/ 3. Afterlife 4. Under a Glass Moon 5. Wait for Sleep/ 6. Surrounded 7. Ytsejam (w/ drum solo including samples) 8. Puppies on Acid/ 9. Take the Time 10. To Live Forever (w/ Within You Without You (Beatles)) 11. extended jam (includes guitar solo) 12. A Fortune in Lies 13. Another Day 14. Pull Me Under ~~~encore~~~ 15. Eve 16. Learning to Live Twin Peaks (outro tape) 1993/08/28 大阪:フェスティバルホール 1. Metropolis Part I/ 2. Mission Impossible/ 3. Afterlife 4. Under a Glass Moon 5. Wait for Sleep/ 6. Surrounded 7. Ytsejam (w/ drum solo including samples) 8. Puppies on Acid/ 9. Take the Time 10. To Live Forever (w/ Within You Without You (Beatles)) 11. extended jam (includes guitar solo) 12. A Fortune in Lies 13. Another Day 14. Pull Me Under ~~~encore~~~ 15. Eve 16. Learning to Live Twin Peaks (outro tape)
https://w.atwiki.jp/syusei/pages/13.html
log4j.propetiesのサンプル log4j.rootCategory=INFO, STDOUT # stdout log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout log4j.appender.STDOUT.layout.ConversionPattern=%d{HH mm ss} %-5p %m (%c)%n
https://w.atwiki.jp/0794/pages/106.html
Chapter 1 The final story postscript Cu(..Bacbac.. munching. ) Cu(Barbary and) CuSlow..the way things are going..cake..consume. (sound in which cellular phone is taken out) Cu"Do you come here when it comes Baza and when?" Baza"It is a place that attached now. " Cu (The cellular phone is put away). "All of the other" Baza"Mr. selah keeps in DASD and Gale seems to have begun to keep a strange pet in the treasure search. " Cu(Strange pet. ?)"It is ー ..along.. ・・・ Stripes ..crushing of fellow Dasdauros of selah... " Dogaaaaaan Selah"・・・ just now" Cu"・・・・・・ Is does you leave, and the harvest ..goodness..?" Baza(shelter and shelter) Selah「Harvest?It was useless at all. 」 Cu"Then, it is left externals or, I must be going ..for my Cuu.. ..... " Selah"The trident mug has bought said arms. " Cu"It did shopping that it is good, and, then, I must be going for the urgent business. " Selah"Who was able to be crushed a little while ago did you say?" Cu"Then, ..bamboo basket.. lose because of the nature ・・・. " Selah "I firmly heard it. "(The finger is put on the trigger. ) Cu"Kinosada" Selah" ..".. Dantsu Baza "・・・."(It is a consequence of its deeds ・・・. ) The 15th story postscript Baza「It is 15 ! story completion. 。」 Gale「Baza is tired why. It is correction point multi in special this time. 」 Baza"It is not a correction this time but it is possible to say, and making wholly. " Cu selah Gale「Food food food food food food food food food. ?」 BazaAs for this story, because it is "there are quite a lot of characters, and the conversation is a little ‥ I m sorry for the readers. " Gale"・・・ There is no such smilingbroadly ..doing.. when said. " Cu"Nature that battle scene in star and tumbling doll I is terrible and detailed" Baza"" Baza"It is not the first time to make wholly. " Cu selah Gale「Food food food food food food food food food. ?」 Gale"It is, and is Hanashi on earth how many. " Baza"Secret ♪" Cu" ..feeling like ".. Selah" ..feeling like ".. RicouFeeling like "Isn t this work title amusing if it says?" Gale" Ricou"Thank you" CuTitle..travel..considerably..come off..content. Baza"It is likely to become travel in Chapter 2 according to the story of Git. " RicouGood..as it is..title..revenge..play..angel..martial..erasure..story. Baza"Title ..unpleasant.. of that ..・・・・.." Gale" Baza.."each other.." Gale"What" Baza"It is a big deal. " Gale"? of what" Baza"It seems to be butter shortage in Japan now. " Gale"It is good by some means. " Cu"It is serious. " Baza「It is so. It is what very. Bread and butter is eaten and, the way things are going, without ・・・」 Gale"・・・ . It falls in love, and bread and butter. " Baza"Oh bread and butter was able often to be prepared. " Gale"Then, world and . of the imagination. " BazaThe next final times Chapter 1 are ..saying.. .."each other... " ..Git after ,... Cu selah Gale Ricou「Food food food food food food food food food. ?」 The 14th story postscript Baza"That Ponja was Mr. selah after all or it is ww. " Gale"No, it is not possible do differ because of that author and to know. " Selah. "(While eating the pudding. ) Cu "It is thought that the fight is sure to be suited though it is strong to make this me half kill. "(serious face) Baza(It is ..the encounter.. .., Cu.. ..chancy.. ・・・・. ) Selah "・・・."(While eating the pudding. ) Baza(That?It is not angry. Favor of pudding?) Gale"However, it is ..Zl.. that only selah eats the pudding ..it is... " Baza"The beer has been bought for Gale thinking saying so. " Gale"Oh there is however Baza ..attentive.. ..ww.. ..the minority... " Baza"It encounters ..the minority it.. and , beer is put in the refrigerator. " Cu"Mine is ..something... " Baza"This in Cu. " Cu"Potato Yorcan of Palermo sign ・・・" BazaWell..tea. Talk..continue..live.(While looking for the tea cup. ) Gale "Cu is a doubt and doesn t have whether to stay on as it is in the satan army. "(sound in which can of beer is opened) Baza "It is thought that Mr. selah s persuasion goes well. "(While pouring the hot water into the tea packing. ) Cu "・・・ Is it a Palermo sign? ・・・. "(While seeing the package. ) Selah "I am ・・・・ ..wanting no belief as the transformation to the porn jar... "(While opening the second pudding. ) Cu "・・・ It is a Palermo type sweet jelly made from bean jam. "(.... the Shilshiimo Palermo sweet jelly made from bean jam served from the box. ) Talk..prolong..next time.(While taking tea. ) Cu "・・・ . Gocri"(While carrying to the curving mouth that shaves the potato sweet jelly made from bean jam being resemble Palermo closely by splendor. ) Gale "・・・ it is ..can carrying to such a thing entrance well.."(whisper) CuQuite..delicious. (Continue to next time. ) The 13th story postscript Development is being forecast the performers of this work in the future ・・・. Baza"What ..considering.. do you think that it becomes it?" GaleHow..become..first of all..selah..confrontation..think. Selah Cu「Is it Mage??」 Baza"Mr. selah can persuade Cu and exist. " Selah" "Though I am glad of that CuOne..good..provide..selah..get angry..scary. Baza「Food. ?Mr. selah is angry, too ・・・ It is unexpected. 」 Cu "It is confusedly scary ・・・ It is ・・・ ....only eating.. ..a half.. killing.. Gftsu as for the pudding put importantly. "(The kick of selah ..Cu.. faints direct hit Cu. ) Baza「・・・。」 Gale「・・・。」 Selah"Haahaa" BazaCrowd..this time..do. Gale" Baza"When it is the state as it is, seem to become long. " Gale" BazaNext time..do. Gale"Let s do not meet again in your 14 stories (and the reader). " Baza"If Mr. selah eats the mood and the pudding, do it reconcile?" Gale"Do not understand. " Baza"Buy it. " (Continue to next time. ) The 12th story postscript Story..come..sleep..this..work..make..go..erratum..expression..correction..unexpectedly.. mistake..lustful.., especially..satan..army..Gale..Kansai..valve..how many..mend..Kansai.. valve..often..know..trouble..correction..add..remain..correction..point..a lot of..a little..head..come..assassin..send..postscript..chapter..reference..a little..hold out.. well..story..notify beforehand..story..rappee..selah..Mr...story.Looking forward
https://w.atwiki.jp/ttbwiki/pages/2.html
メニュー トップページ プラグイン紹介 まとめサイト作成支援ツール メニュー メニュー2 プログラム テンプレート C言語 perl FLASH/AS スレッド ソケット odbc JNI コマンドイメージ gdb nfs uboot ネットワークブート linuxコマンド SQL データベース色々 MySQL postgreSQL 情報処理 基礎理論 アルゴリズムとプログラミング コンピュータ構成要素 システム構成要素 ソフトウェア ハードウェア ヒューマンインターフェース マルチメディア データベース ネットワーク セキュリティ システム開発技術 ソフトウェア開発管理技術 プロジェクトマネジメント サービスマネジメント システム監査 システム戦略 システム企画 経営戦略マネジメント 技術戦略マネジメント ビジネスインダストリ 企業活動 法務 メンタルヘルスマネジメント メンタルヘルスケアの意義 メンタルヘルスに関する基礎知識 セルフケアの重要性 ストレスへの気付き方 ストレスへの対処、軽減の方法 メンヘル過去問 アロマテラピー 製油のプロフィール アロマテラピーの歴史 アロマと身体の関係 アロマテラピーとは アロマと健康学 アロマ予想問題 知識 企画 要件定義 設計 テスト 運用 ネットワーク関係 稼働率 確率・標準偏差 待ち行列 ビット誤り CPU関係 メモリ関係 規格 クライアントサーバ サンプリング PBX モジュール強度 故障 タグチメソッド サービス マネジメントストラテジ 法律 アロマテラピー メンタルヘルスマネジメント 色彩検定 プロジェクト tmp1 tmp2 tmp3 リンク @wiki @wikiご利用ガイド ここを編集
https://w.atwiki.jp/taisay/pages/20.html
2006-11-23(Fri)10 00~19 00,東京丸ビルと近辺現代リアル学Open Reserch Forum2006バーチャルからリアルへ http //www.itmedia.co.jp/enterprise/articles/0611/01/news004.htmlインターフェース2.0の講演が良かった。ユーザーと開発者の垣根がなくなってきた。 2006-11-8(Sun)10 00~18 00、お台場、国際展示場JIMTOF2006 第26回国際工作機械見本市http //techon.nikkeibp.co.jp/article/HONSHI/20061126/124451/招待がもらえたので行って来た。2回目。ロボットも多い。CADCAMは進化している。 2006-9-30(Mon)、調布MSデベロップメント 翻訳的な仕事の印象。ユーザーのデータを取る部屋がある。 2006-9-28(Sat)、横浜日立ユビキタス研究所 研究所ではなく事業所。モノターに注力していた。 2006-9-27(Wen)、YRP野比富士通研究所 研究者の評価とか明確にしつつあるところと言った感じだった。アンテナ車グッド 2006-9-25(Mon)、YRP野比ドコモR Dセンター 非常に貪欲にアイデアを展示している。端的にいうとスマートハウス。 2006-9-24(Sat)10 00~18 00、お台場モータースポーツ2006 http //www.ip.uec.ac.jp/ipo/katsudou/event_prev.html初のイベントで手探り状態。F1マシンのスピンは一見の価値有り 2006-11-15(Fri)15 00~18 00、早稲田大学小野記念講堂 「日本における伝統的身体」シンポジウム第四回(最終回)-武道の身体- 講師:柳生耕一氏(宗家) 早稲田大COEhttp //www.waseda.jp/prj-21coe-enpaku/jp/course/course04_02.html柳生新陰流22世の演技とトーク。将軍家指南の型を披露。 2006-5-8(Sun)10 00~18 00、東大、弥生講堂「言語から読み解くゲノムと生命システム」21世紀COEプログラム、バイオインフォマティクスhttp //www.ib.k.u-tokyo.ac.jp/kyoutu-seminar/bioinfo.html今後十年で発生もシミレート対象に!KOのとはまた違う動き。 2006-4-7(Fri)10 00~18 00、五反田SONYインテリジェント・ダイナミクス2006 第3回I・Dhttp //kenmogi.cocolog-nifty.com/qualia/2006/02/post_6cbc.htmlhttp //so-mo.net/archives/2006/06/post_465.html茂木さんが来た。詰まった印象。その後責任者が亡くなられSONYに吸収。 2006-3-8(Sun)18 00~、東工大百年記念館3階角笛電気を選べ、未来を選べ 第1回サイエンスカフェhttp //www.iri.titech.ac.jp/literacy/com/cafe.html研究の説明責任という視点から参加。やや簡単だった。 以下、未整理 日立系原子力:I&C、インスツールメント&コントロール6‐26ルネサステクノロジー三好特許事務所NHK東芝ロボットが日本を救う 中山アイスタイル アットコスメ社長 6‐ アイデアコンテスト出場
https://w.atwiki.jp/ma-100140/pages/12.html
sjisでの文字化けを回避するための方法 MySQLの設定 下記のような状態になるように設定する。 MySQLとconnectした後にset names sjis;を発行する。 mysql SHOW VARIABLES LIKE character\_set\_% ; +--------------------------+--------+ | Variable_name | Value | +--------------------------+--------+ | character_set_client | cp932 | | character_set_connection | cp932 | | character_set_database | cp932 | | character_set_filesystem | binary | | character_set_results | cp932 | | character_set_server | cp932 | | character_set_system | utf8 | +--------------------------+-------- 7 rows in set (0.00 sec) ● システム変数の用途 character_set_system "indentifiers" (テーブル名とかカラム名?) を格納するのに使われる。 utf8で 固定。 character_set_server character_set_database のデフォルト値に影響する。 character_set_database CREATE DATABASE で文字コードが指定されなかった場合、database の文字コー ドはこれになる。 character_set_connection の値に影響する character_set_client クライアントから渡された SQL 文はこの文字コードであると解釈される。 character_set_connection キャラクタセットイントロデューサ (例えば『_ujis ほげ 』)が省略された SQL 文中の文字列リテラルはこの文字コードであると解釈される。 character_set_results サーバーがクライアントに返す結果をこの文字コードに変換する。 この変数を NULL にセットすると、結果に対する文字コード変換をしないよ うにできる。 Linux での mysql.cnfの設定 win用と同じ設定にしてもうまくいかなっかった。グローバル値は上記のようになったが、セッション値はujisになった。よって自動変換をしないようにskipしたら直った。 null の演算 Accessの場合はNz()関数 MySQLではcoalesce() 関数は、最初の null でないデータを返す。 coalesce($変数,0) select coalesce(null, abc , def ); +------------------------------+ | coalesce(null, abc , def ) | +------------------------------+ | abc | +------------------------------+ 別名での定義(レスポンスに差があるのか) 別名を使用したとき select seisank_ns.katasikic from seisank_ns inner join (select seisank_nsh.katasikic from seisank_nsh) as H on seisank_ns.katasikic = H.katasikic id select_type table type possible_keys key key_len ref rows Extra 1 PRIMARY ALL 507 1 PRIMARY seisank_ns index alt2 58 4340 Using where; Using index 2 DERIVED seisank_nsh index atl1 58 507 Using index 使用しなかったとき select seisank_ns.katasikic from seisank_ns inner join seisank_nsh on seisank_ns.katasikic = seisank_nsh.katasikic id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE seisank_nsh index atl1 58 507 Using index 1 SIMPLE seisank_ns index alt2 58 4340 Using where; Using index やっぱり、副問い合わせの分が余分にかかっている。 2つのカラムでLike句を使う 2つのテーブル顧客住所と住所があります。 顧客ID 住所1 住所2 1 北海道 札幌市手稲区○○ 2 北海道 旭川市△■ 住所ID 市区町村名 文字数 1 札幌市手稲区 6 2 旭川市 3 住所テーブルを使って、顧客テーブルの住所1の北海道(都道府県)を市区町村に置き換えます。 Accessでは UPDATE 顧客, 住所 SET 顧客.住所1 = 住所!市区町村名, 顧客.住所2 = Right([住所2],Len([住所2])-住所!文字数) WHERE (((顧客.住所2) Like [住所]![市区町村名] "*")); MySQLでは UPDATE 顧客, 住所 SET 顧客.住所1 = 住所!市区町村名, 顧客.住所2 = Right(住所2,CHAR_LENGTH(住所2-住所.文字数) WHERE (((顧客.住所2) Like concat(住所.市区町村名, % ) )); ポイントは文字列の連結にconcatを使うことと、文字列の長さを求めるのにCHAR_LENGTHを使うこと SQLServerではうまく行きませんでした。直積の書き方が違うみたい。「UPDATE 顧客, 住所」のところでエラーが出る。 結果は 顧客ID 住所1 住所2 1 札幌市手稲区 ○○ 2 旭川市 △■ nonプログラミングでこんな処理ができます。SQLは便利だ。 ODBCドライバーのエラー [MySQL][ODBC 3.51 Driver]Lost connection to MySQL server at reading initial communication packet , system error 0 新しいPCにODBCドライバーをインストールしましたが、上記エラーで繋がりません?何でだろう? このページを読むと http //stackoverflow.com/questions/961928/could-not-connect-lost-connection-to-mysql-server-at-reading-initial-communica やはりセキュリティの関係のようでした。MySQLが動いているLinuxサーバーのhosts関係に新しくつなぐPCを登録して事なきを得ました。
https://w.atwiki.jp/kcwest/pages/21.html
PID USERNAME SIZE RSS STATE PRI NICE TIME CPU PROCESS/NLWP 580 root 8716K 5216K sleep 59 0 0 02 33 0.1% vmtoolsd/2 824 noaccess 151M 119M run 59 0 0 01 19 0.1% java/18 2132 root 3696K 2836K cpu0 59 0 0 00 00 0.0% prstat/1 2104 sysadmin 6888K 3800K run 59 0 0 00 00 0.0% sshd/1 1281 root 32M 15M sleep 59 0 0 00 23 0.0% Xorg/1 1319 root 12M 7384K sleep 59 0 0 00 13 0.0% dtgreet/1 2114 root 1716K 968K run 49 0 0 00 00 0.0% ksh/1 1834 root 6216K 3180K sleep 59 0 0 00 00 0.0% sshd/1 366 root 2084K 888K sleep 59 0 0 00 00 0.0% sac/1 475 root 2072K 636K sleep 59 0 0 00 00 0.0% smcboot/1 239 root 2956K 924K sleep 59 0 0 00 00 0.0% cron/1 195 root 2436K 724K sleep 59 0 0 00 00 0.0% iscsi-initiator/2 339 daemon 2772K 920K sleep 59 0 0 00 00 0.0% rpcbind/1 2110 sysadmin 1712K 948K sleep 59 0 0 00 00 0.0% ksh/1 145 root 7436K 2788K sleep 59 0 0 00 02 0.0% nscd/31 393 root 1440K 620K sleep 59 0 0 00 00 0.0% utmpd/1 379 root 4840K 2668K sleep 59 0 0 00 00 0.0% inetd/3 144 root 3820K 2328K sleep 59 0 0 00 00 0.0% picld/4 357 root 3044K 1592K sleep 59 0 0 00 00 0.0% automountd/3 344 root 2576K 980K sleep 59 0 0 00 01 0.0% in.routed/1 138 daemon 4416K 2008K sleep 59 0 0 00 00 0.0% kcfd/3 140 root 1784K 992K sleep 59 0 0 00 00 0.0% powerd/3 Total 49 processes, 191 lwps, load averages 0.00, 0.00, 0.00
https://w.atwiki.jp/drip122/pages/42.html
Postgres、Oracle CREATE DATABASE単位で文字コードを設定できる 例)postgresの場合 CREATE DATABASE postgres WITH OWNER = postgres ENCODING = UTF8 CONNECTION LIMIT = -1; SQLServer 使用するデータ型によって文字コードが指定されます。 データ型がchar、varchar、textの場合:MS932 データ型がnchar、nvarchar、ntextの場合:Unicode JDBCでSQLServerに接続する際の注意点 JDBC Driver Version 2.0 では、CHAR、VARCHAR、LONGVARCHAR の各 JDBC 型のパラメーター値を送信するときにのみ、sendStringParametersAsUnicode プロパティがチェックされます。JDBC 4.0 の新しい National Character メソッドである、SQLServerPreparedStatement クラスおよび SQLServerCallableStatement クラスの setNString、setNCharacterStream、setNClob などのメソッドでは、このプロパティの設定に関係なく、常に、サーバーに対してパラメーター値が Unicode で送信されます。 CHAR、VARCHAR、LONGVARCHAR などの JDBC データ型の使用に伴うパフォーマンスを最適に保つためには、JDBC ドライバーのバージョン 2.0 を使用するアプリケーションは、sendStringParametersAsUnicode プロパティを "false" に設定し、National Character メソッド以外のメソッドである、SQLServerPreparedStatement クラスおよび SQLServerCallableStatement クラスの setString、setCharacterStream、setClob を使用する必要があります。 アプリケーションで sendStringParametersAsUnicode プロパティが "false" に設定されていて、National Character メソッド以外のメソッドを使用してサーバー側の Unicode データ型 (nchar、nvarchar、ntext など) にアクセスする場合に、National Character メソッド以外のメソッドで渡される文字列パラメーターの文字がデータベース照合順序でサポートされていないときには、一部のデータが失われる可能性があります。 アプリケーションでは、NCHAR、NVARCHAR、LONGNVARCHAR の各 JDBC データ型に対して、SQLServerPreparedStatement クラスおよび SQLServerCallableStatement クラスの National Character メソッドである setNString、setNCharacterStream、および setNClob を使用する必要がある点に注意してください。 接続プロパティ:sendStringParametersAsUnicode sendStringParametersAsUnicode プロパティの既定値は "true" です。 sendStringParametersAsUnicode プロパティが "true" に設定されている場合、文字列パラメーターは Unicode 形式でサーバーに送信されます。 sendStringParametersAsUnicode プロパティが "false" に設定されている場合、文字列パラメーターは、Unicode ではなく ASCII/MBCS などの Unicode 以外の形式でサーバーに送信されます。 参考URL http //www.hitachi.co.jp/Prod/comp/soft1/manual/pc/d3M0360/EM030327.HTM http //msdn.microsoft.com/ja-jp/library/bb330962(SQL.90).aspx http //okwave.jp/qa3418167.html http //msdn.microsoft.com/ja-jp/library/ms378988.aspx
https://w.atwiki.jp/eccube2ch/pages/31.html
CPIサーバーへのインストール方法 (シェアードプラン X10の場合) 2.0.1a及び2.1.1-betaで確認済み) 2系インストール時の注意事項 - PostgreSQL 8.1.10利用時 htaccess PHPのCGI版なので記述に注意(下記はPHP5.2.4の動作の記述とphp.iniへのPATH AddHandler x-httpd-php524 .php suPHP_ConfigPath /usr/home/ユーザーID/html/ ↑ルートディレクトリにhtml内のファイルを設置した際のPATH html内へphp.iniの配置です。 php.ini [mbstring] mbstring.language = Japanese mbstring.internal_encoding = EUC-JP mbstring.http_input = UTF-8 mbstring.http_output = pass mbstring.encoding_translation = Off mbstring.detect_order = auto mbstring.substitute_character = none; インストール前ファイル修正(修正しないとインストールできません) +表記は追加、-表記は削除 左の行は修正後の行番号になります。 UTF-8でEUCデータベースを使う際の修正箇所です。 data/class/pages/admin/basis/LC_Page_Admin_Basis_ZipInstall.php 106 + $search = array( ~ , - ); 107 + $replace = array( ~ , - ); 108 while (!feof($fp)) { 116 - $sqlval[ state_kana ] = mb_convert_kana($arrCSV[3], "KV"); 116 + $sqlval[ state_kana ] = mb_convert_kana($arrCSV[3], "KV"); 117 - $sqlval[ city_kana ] = mb_convert_kana($arrCSV[4], "KV"); 117 + $sqlval[ city_kana ] = mb_convert_kana($arrCSV[4], "KV"); 118 - $sqlval[ town_kana ] = mb_convert_kana($arrCSV[5], "KV"); 118 + $sqlval[ town_kana ] = mb_convert_kana($arrCSV[5], "KV"); 119 - $sqlval[ state ] = str_replace($search, $replace, $arrCSV[6]); 119 + $sqlval[ state ] = str_replace($search, $replace, $arrCSV[6]); 120 - $sqlval[ city ] = str_replace($search, $replace, $arrCSV[7]); 120 + $sqlval[ city ] = str_replace($search, $replace, $arrCSV[7]); 121 - $sqlval[ town ] = str_replace($search, $replace, $arrCSV[8]); 121 + $sqlval[ town ] = str_replace($search, $replace, $arrCSV[8]); data/class/SC_DbConn.php $this- conn = $objDbConn; ←この行の下に追加 + if ($this- conn instanceof DB_pgsql) { + $this- conn- query("SET NAMES utf8 "); + } インストール時の注意 初期設定終了時、データベース作成のときに必ずエラーが出ます。 初期データの登録に失敗となるはずです。 全角文字"~"(0xe3809c)の問題でのエラーですが、無視して次へを押してください。 また続いて、リレーションがすでにあると言う警告が出ますが無視してください。 データベースの初期化をしないにチェックをして次へを押してください。 一応コレでインストールは完了です。 ですが管理者画面にログインできません。管理者が登録されていないため。そこで 最後に phPgadminを開いてSQLコマンドで insert into dtb_member (name,department,login_id,password,authority,del_flg,creator_id) VALUES ( 管理者 , admin , 管理者ID , ローカル環境で設定したパスの暗号ソース , 0 , 0 , 0 ) 管理者ID(半角英数)、暗号化したパス(ローカル環境か何かでDBの中身を見てコピーしてください) これで管理者画面へログインできます。 一応、手順どおりにやれば立ち上げはコレで完了します。 あのー「暗号化したパス(ローカル環境か何かでDBの中身を見てコピーしてください)」 って具体的にどこを見ればいいんでしょうか?